

  import { createApp } from 'vue'
  import { createRouter, createWebHashHistory } from 'vue-router';
  import App from '@/App.vue'
  import router from '@/router'
  import store from '@/store'
  import axios from '@/utils/request'
  import 'virtual:svg-icons-register'
  import svgIcon from '@/components/iconSvg/index.vue'
  import 'default-passive-events'
  import ElementPlus, { ElMessageBox }  from "element-plus";
  import "element-plus/dist/index.css";
  import locale from 'element-plus/lib/locale/lang/zh-cn';
  import * as ElementPlusIconsVue from '@element-plus/icons-vue';
  //动画库样式
  import "@/assets/styles/animate.css";
  import { installGlobalMethods } from "@/plugins/globalMethods/index.js"
  import { installDirectives } from "@/directive/permission/index.js"
  import './permission.js'
  const app = createApp(App)


  //全局注册组件
  app.use(ElementPlus,{ locale });
  app.component('svg-icon', svgIcon)
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
  }
  // 全局引入axios
  app.config.globalProperties.$axios = axios
  // 全局函数 filter 权限
  installGlobalMethods(app)
  // 全局指令
  installDirectives(app)

  app.config.globalProperties.$confirm =ElMessageBox.confirm

  app.use(router).use(store).mount('#app')

